function PickMealController(){
    var restaurant_id = localStorage.getItem('restaurant_id');
    $.ajax({
        url:"pick_meal_name",
        type:"post",
        data:{
            restaurant_id:restaurant_id
        },
        dataType:"json",
        success:function(data){
            data.forEach(function(name) {
                var set_meal_name = "<a href='../pages/order-meal.html'><li type='button' class='list-style-4' onclick='SetMealName(" + '"' + name.MealName + '"' + "," + '"' + name.MealPrice + '"' + ")'>" + name.MealName + "<p class='price'>" + name.MealPrice + "</p></li></a>";
                $("ul").append(set_meal_name)
            })
        }
    })
}

function SetMealName(MealName,MealPrice){
    var meal = new Meal(MealName,MealPrice);
    meal.save()
}